<?php
require_once '../config/config.php';
$conn = new mysqli(HOST, USER, PASSWORD, DATABASE);
if ($conn->connect_errno) {
    die('数据库连接失败' . $conn->connect_error);
}
$stmt = $conn->prepare('delete from banner_list where id=? and src=?');
$stmt->bind_param('is', $_REQUEST['id'],$_REQUEST['src']);
var_dump($_REQUEST['id']);
var_dump($_REQUEST['src']);
$stmt->execute();
if ($stmt->affected_rows===1) {
    echo "<script>alert('删除成功,点击返回');window.location='bannerselect.php'</script>";
} else {
    echo "<script>alert('删除失败,点击返回');window.location='bannerselect.php'</script>";
}
unlink(ROOT.$_REQUEST['src']);